package jvm;

import org.apache.commons.beanutils.ContextClassLoaderLocal;

import java.lang.reflect.Method;
import java.sql.DriverManager;

/**
 * @program JavaBase
 * @description:
 * @author: zhanglu
 * @create: 2021-02-20 17:25:00
 */
public class ClassLoaderTest {

    public static void main(String[] args) throws Exception {
        HClassLoader hClassLoader = new HClassLoader("/Users/zhanglu/Desktop/lu/workspace/dev_workspace/idea/学习/JavaBase/JavaBase/temp/");
        Class<?> aClass = hClassLoader.loadClass("jvm.Car");
        Object o = aClass.newInstance();
        Method print = aClass.getDeclaredMethod("print", null);
        print.invoke(o, null);
    }

}
